/* Used to make sure files are only brought in once */
#ifndef DRAWABLE_H
#define DRAWABLE_H


#include "Vec3f.h"
#include <vector>
using namespace std;

/*
 * Anything that can be drawn
 */
class IDrawable 
{
public:
   virtual void draw(bool) = 0;
   virtual void drawShadow(Vec3f, Vec3f, int);
   IDrawable()
   {
      
      count = _count;
      _drawables.push_back(this);
      _count++;
   }
   static IDrawable* getIDrawable(int value)
   {
      return _drawables[value];
   }
   virtual void setActive()
   {
      active = true;
   }
   virtual void setInactive()
   {
      active = false;
   }
   virtual ~IDrawable()
   {
      
   }
protected:
   bool active;
   int count;
   static int _count;
   static vector<IDrawable*> _drawables;
};

/*
 * Any object
 * - support for colors, lighting and textures
 */
class IDrawableObject: public IDrawable 
{
public:
   IDrawableObject();
   virtual void draw(bool);
   virtual void drawShadow(Vec3f, Vec3f, int);
   void texture(char *_image);
   void setShininess(int);
   void setSpecular(Vec3f);
   void setColor(Vec3f);
   Vec3f getColor()
   {
      return color;
   }
protected:
   Vec3f color;
   Vec3f specular;
   int shininess;
};

#endif
